<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32VGA: ESP32VGA::VGACanvasClass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32VGA
   </div>
   <div id="projectbrief">ESP32 VGA Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>ESP32VGA</b></li><li class="navelem"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html">VGACanvasClass</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ESP32VGA::VGACanvasClass Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A class with a set of drawing methods.  
 <a href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_v_g_a_canvas_8h_source.html">VGACanvas.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2ee323961fcf178344dad546420acd9b"><td class="memItemLeft" align="right" valign="top"><a id="a2ee323961fcf178344dad546420acd9b"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a2ee323961fcf178344dad546420acd9b">getWidth</a> ()</td></tr>
<tr class="memdesc:a2ee323961fcf178344dad546420acd9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the canvas width in pixels. This is equivalent to VGA Controller viewport width. <br /></td></tr>
<tr class="separator:a2ee323961fcf178344dad546420acd9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa54ee1ec86ade8bbfa8ba2f352370fa2"><td class="memItemLeft" align="right" valign="top"><a id="aa54ee1ec86ade8bbfa8ba2f352370fa2"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#aa54ee1ec86ade8bbfa8ba2f352370fa2">getHeight</a> ()</td></tr>
<tr class="memdesc:aa54ee1ec86ade8bbfa8ba2f352370fa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the canvas height in pixels. This is equivalent to VGA Controller viewport height. <br /></td></tr>
<tr class="separator:aa54ee1ec86ade8bbfa8ba2f352370fa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbb4c2e5840845fdb3552c0e0879afaa"><td class="memItemLeft" align="right" valign="top"><a id="abbb4c2e5840845fdb3552c0e0879afaa"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#abbb4c2e5840845fdb3552c0e0879afaa">clear</a> ()</td></tr>
<tr class="memdesc:abbb4c2e5840845fdb3552c0e0879afaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the entire canvas with the brush color. <br /></td></tr>
<tr class="separator:abbb4c2e5840845fdb3552c0e0879afaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a9f5c86aca6c76ed95b6db2c1c91455"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a3a9f5c86aca6c76ed95b6db2c1c91455">setScrollingRegion</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:a3a9f5c86aca6c76ed95b6db2c1c91455"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the scrolling region.  <a href="#a3a9f5c86aca6c76ed95b6db2c1c91455">More...</a><br /></td></tr>
<tr class="separator:a3a9f5c86aca6c76ed95b6db2c1c91455"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29fba58b06059dfd2e2aaf702f102c28"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a29fba58b06059dfd2e2aaf702f102c28">scroll</a> (int16_t offsetX, int16_t offsetY)</td></tr>
<tr class="memdesc:a29fba58b06059dfd2e2aaf702f102c28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scrolls pixels horizontally and/or vertically.  <a href="#a29fba58b06059dfd2e2aaf702f102c28">More...</a><br /></td></tr>
<tr class="separator:a29fba58b06059dfd2e2aaf702f102c28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a170b2de935a499d70c7fc89a5512609d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a170b2de935a499d70c7fc89a5512609d">moveTo</a> (int16_t X, int16_t Y)</td></tr>
<tr class="memdesc:a170b2de935a499d70c7fc89a5512609d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves current pen position to the spcified coordinates.  <a href="#a170b2de935a499d70c7fc89a5512609d">More...</a><br /></td></tr>
<tr class="separator:a170b2de935a499d70c7fc89a5512609d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6fa25e3a21dd816f91d9026568bb61a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#aa6fa25e3a21dd816f91d9026568bb61a">setPenColor</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr>
<tr class="memdesc:aa6fa25e3a21dd816f91d9026568bb61a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets pen (foreground) color specifying color components.  <a href="#aa6fa25e3a21dd816f91d9026568bb61a">More...</a><br /></td></tr>
<tr class="separator:aa6fa25e3a21dd816f91d9026568bb61a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb2f75e98a87e17605f6b76b78946d77"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#afb2f75e98a87e17605f6b76b78946d77">setPenColor</a> (<a class="el" href="_v_g_a_controller_8h.html#a9bf2d199a46b81e16b229abae694d320">Color</a> color)</td></tr>
<tr class="memdesc:afb2f75e98a87e17605f6b76b78946d77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets pen (foreground) color using a color name.  <a href="#afb2f75e98a87e17605f6b76b78946d77">More...</a><br /></td></tr>
<tr class="separator:afb2f75e98a87e17605f6b76b78946d77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afad05f6e02eb22aea6177b198dbeb50a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#afad05f6e02eb22aea6177b198dbeb50a">setBrushColor</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr>
<tr class="memdesc:afad05f6e02eb22aea6177b198dbeb50a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets brush (background) color specifying color components.  <a href="#afad05f6e02eb22aea6177b198dbeb50a">More...</a><br /></td></tr>
<tr class="separator:afad05f6e02eb22aea6177b198dbeb50a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19ebed82efd608547ed2d8a9ca678c11"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a19ebed82efd608547ed2d8a9ca678c11">setBrushColor</a> (<a class="el" href="_v_g_a_controller_8h.html#a9bf2d199a46b81e16b229abae694d320">Color</a> color)</td></tr>
<tr class="memdesc:a19ebed82efd608547ed2d8a9ca678c11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets brush (background) color using a color name.  <a href="#a19ebed82efd608547ed2d8a9ca678c11">More...</a><br /></td></tr>
<tr class="separator:a19ebed82efd608547ed2d8a9ca678c11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6d6ac4139b68a8f541cee307b6a54c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#ae6d6ac4139b68a8f541cee307b6a54c9">setPixel</a> (int16_t X, int16_t Y)</td></tr>
<tr class="memdesc:ae6d6ac4139b68a8f541cee307b6a54c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a single pixel with the pen color.  <a href="#ae6d6ac4139b68a8f541cee307b6a54c9">More...</a><br /></td></tr>
<tr class="separator:ae6d6ac4139b68a8f541cee307b6a54c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe1914cd3853c0e24fcee32461e37fb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#afe1914cd3853c0e24fcee32461e37fb6">lineTo</a> (int16_t X, int16_t Y)</td></tr>
<tr class="memdesc:afe1914cd3853c0e24fcee32461e37fb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a line starting from current pen position.  <a href="#afe1914cd3853c0e24fcee32461e37fb6">More...</a><br /></td></tr>
<tr class="separator:afe1914cd3853c0e24fcee32461e37fb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5387c80ffee2930a85495ed0879e1ea1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a5387c80ffee2930a85495ed0879e1ea1">drawLine</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:a5387c80ffee2930a85495ed0879e1ea1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a line specifying initial and ending coordinates.  <a href="#a5387c80ffee2930a85495ed0879e1ea1">More...</a><br /></td></tr>
<tr class="separator:a5387c80ffee2930a85495ed0879e1ea1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6aecda7d9c7617788b4b9661afb25f34"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a6aecda7d9c7617788b4b9661afb25f34">drawRectangle</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:a6aecda7d9c7617788b4b9661afb25f34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a rectangle using the current pen color.  <a href="#a6aecda7d9c7617788b4b9661afb25f34">More...</a><br /></td></tr>
<tr class="separator:a6aecda7d9c7617788b4b9661afb25f34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a282ed70780704effc95fe0bb4124bc0d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a282ed70780704effc95fe0bb4124bc0d">fillRectangle</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:a282ed70780704effc95fe0bb4124bc0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a rectangle using the current brush color.  <a href="#a282ed70780704effc95fe0bb4124bc0d">More...</a><br /></td></tr>
<tr class="separator:a282ed70780704effc95fe0bb4124bc0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae21a0bd0a1377feeaf598f8a6b6a88cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#ae21a0bd0a1377feeaf598f8a6b6a88cc">swapRectangle</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:ae21a0bd0a1377feeaf598f8a6b6a88cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps pen and brush colors of the specified rectangle.  <a href="#ae21a0bd0a1377feeaf598f8a6b6a88cc">More...</a><br /></td></tr>
<tr class="separator:ae21a0bd0a1377feeaf598f8a6b6a88cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46b2a72d2aa5b0f1444e90aa01f889fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a46b2a72d2aa5b0f1444e90aa01f889fc">drawEllipse</a> (int16_t X, int16_t Y, uint16_t width, uint16_t height)</td></tr>
<tr class="memdesc:a46b2a72d2aa5b0f1444e90aa01f889fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws an ellipse specifying center and size, using current pen color.  <a href="#a46b2a72d2aa5b0f1444e90aa01f889fc">More...</a><br /></td></tr>
<tr class="separator:a46b2a72d2aa5b0f1444e90aa01f889fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abae2bb3c2ac686ba866aa389fd416c78"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#abae2bb3c2ac686ba866aa389fd416c78">fillEllipse</a> (int16_t X, int16_t Y, uint16_t width, uint16_t height)</td></tr>
<tr class="memdesc:abae2bb3c2ac686ba866aa389fd416c78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills an ellipse specifying center and size, using current brush color.  <a href="#abae2bb3c2ac686ba866aa389fd416c78">More...</a><br /></td></tr>
<tr class="separator:abae2bb3c2ac686ba866aa389fd416c78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76c129d38c766e5e1f73319c794bf7ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a76c129d38c766e5e1f73319c794bf7ae">waitCompletion</a> (bool waitVSync=true)</td></tr>
<tr class="memdesc:a76c129d38c766e5e1f73319c794bf7ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for drawing queue to become empty.  <a href="#a76c129d38c766e5e1f73319c794bf7ae">More...</a><br /></td></tr>
<tr class="separator:a76c129d38c766e5e1f73319c794bf7ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a007a1dbdf483d92335631f3727091687"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a007a1dbdf483d92335631f3727091687">drawGlyph</a> (int16_t X, int16_t Y, uint16_t width, uint16_t height, uint8_t const *data, uint16_t index=0)</td></tr>
<tr class="memdesc:a007a1dbdf483d92335631f3727091687"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a glyph at specified position.  <a href="#a007a1dbdf483d92335631f3727091687">More...</a><br /></td></tr>
<tr class="separator:a007a1dbdf483d92335631f3727091687"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:acb3142c2bef5036cb794cf6c52d1342c"><td class="memItemLeft" align="right" valign="top">static FontInfo const  *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#acb3142c2bef5036cb794cf6c52d1342c">getPresetFontInfo</a> (uint8_t columns)</td></tr>
<tr class="memdesc:acb3142c2bef5036cb794cf6c52d1342c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the font info that best fits the specified number of columns.  <a href="#acb3142c2bef5036cb794cf6c52d1342c">More...</a><br /></td></tr>
<tr class="separator:acb3142c2bef5036cb794cf6c52d1342c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class with a set of drawing methods. </p>
<p>This class interfaces directly to the VGA controller and provides a set of primitives to paint lines, circles, etc. and to scroll regions, copy rectangles and draw glyphs. Origins are at top left, starting from (0, 0) up to (Canvas Width - 1, Canvas Height - 1).</p>
<p>Example: </p><pre class="fragment">// Setup pins and resolution (5 GPIOs hence we have up to 8 colors)
VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5);
VGAController.setResolution(VGA_640x350_70Hz);

// Paint a green rectangle with red border
VGACanvas.setPenColor(Color::BrightRed);
VGACanvas.setBrushColor(Color::BrightGreen);
VGACanvas.fillRectangle(0, 0, VGACanvas.getWidth() - 1, VGACanvas.getHeight() - 1);
VGACanvas.drawRectangle(0, 0, VGACanvas.getWidth() - 1, VGACanvas.getHeight() - 1);</pre> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a46b2a72d2aa5b0f1444e90aa01f889fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46b2a72d2aa5b0f1444e90aa01f889fc">&#9670;&nbsp;</a></span>drawEllipse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::drawEllipse </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws an ellipse specifying center and size, using current pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">width</td><td>Ellipse width. </td></tr>
    <tr><td class="paramname">height</td><td>Ellipse height.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a yellow ellipse
VGACanvas.setPenColor(Color::BrightYellow);
VGACanvas.drawEllipse(100, 100, 40, 40);</pre> 
</div>
</div>
<a id="a007a1dbdf483d92335631f3727091687"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a007a1dbdf483d92335631f3727091687">&#9670;&nbsp;</a></span>drawGlyph()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::drawGlyph </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>index</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a glyph at specified position. </p>
<p>Glyph is a bitmap (1 bit per pixel) that can be painted using pen (foreground) and brush (background) colors. Various drawing options can be set using VGACanvasClass.setGlyphOptions() method. Glyphs are used by <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_terminal_class.html" title="An ANSI-VT100 compatible display terminal. ">VGATerminalClass</a> to render characters.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate where to draw the glyph. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate where to draw the glyph. </td></tr>
    <tr><td class="paramname">width</td><td>Horizontal size of the glyph. </td></tr>
    <tr><td class="paramname">height</td><td>Vertical size of the glyph. </td></tr>
    <tr><td class="paramname">data</td><td>Memory buffer containing the glyph. Each line is byte aligned. The size must be "(width + 7) / 8 * height" (integer division!). </td></tr>
    <tr><td class="paramname">index</td><td>Optional index inside data. Use when the buffer contains multiple glyphs.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// draw an 'A' using the predefined 80 columns font
VGACanvas.setPenColor(Color::BrightGreen);
const ESP32VGA::FontInfo * f = VGACanvas.getPresetFontInfo(80);
VGACanvas.drawGlyph(0, 0, f-&gt;width, f-&gt;height, f-&gt;data, 0x41);

// draw a 12x8 sprite
const uint8_t enemy[] = {
  0x0f, 0x00, 0x7f, 0xe0, 0xff, 0xf0, 0xe6, 0x70, 0xff,
  0xf0, 0x39, 0xc0, 0x66, 0x60, 0x30, 0xc0,
};
VGACanvas.setPenColor(Color::BrightYellow);
VGACanvas.drawGlyph(50, 80, 12, 8, enemy);</pre> 
</div>
</div>
<a id="a5387c80ffee2930a85495ed0879e1ea1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5387c80ffee2930a85495ed0879e1ea1">&#9670;&nbsp;</a></span>drawLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::drawLine </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a line specifying initial and ending coordinates. </p>
<p>The line has the current pen color.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Starting horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Starting vertical coordinate. </td></tr>
    <tr><td class="paramname">X2</td><td>Ending horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Ending vertical coordinate.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a blue X over the whole canvas
VGACanvas.setPenColor(Color::BrightBlue);
VGACanvas.drawLine(0, 0, VGACanvas.getWidth() - 1, VGACanvas.getHeight() - 1);
VGACanvas.drawLine(VGACanvas.getWidth() - 1, 0, 0, VGACanvas.getHeight() - 1);</pre> 
</div>
</div>
<a id="a6aecda7d9c7617788b4b9661afb25f34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6aecda7d9c7617788b4b9661afb25f34">&#9670;&nbsp;</a></span>drawRectangle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::drawRectangle </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a rectangle using the current pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a yellow rectangle
VGACanvas.setPenColor(Color::BrightYellow);
VGACanvas.drawRectangle(10, 10, 100, 100);</pre> 
</div>
</div>
<a id="abae2bb3c2ac686ba866aa389fd416c78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abae2bb3c2ac686ba866aa389fd416c78">&#9670;&nbsp;</a></span>fillEllipse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::fillEllipse </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills an ellipse specifying center and size, using current brush color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">width</td><td>Ellipse width. </td></tr>
    <tr><td class="paramname">height</td><td>Ellipse height.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a filled yellow ellipse
VGACanvas.setBrushColor(Color::BrightYellow);
VGACanvas.fillEllipse(100, 100, 40, 40);

// Paint a yellow ellipse with blue border
VGACanvas.setPenColor(Color::BrightBlue);
VGACanvas.setBrushColor(Color::BrightYellow);
VGACanvas.fillEllipse(100, 100, 40, 40);
VGACanvas.drawEllipse(100, 100, 40, 40);</pre> 
</div>
</div>
<a id="a282ed70780704effc95fe0bb4124bc0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a282ed70780704effc95fe0bb4124bc0d">&#9670;&nbsp;</a></span>fillRectangle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::fillRectangle </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills a rectangle using the current brush color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a filled yellow rectangle
VGACanvas.setBrushColor(Color::BrightYellow);
VGACanvas.fillRectangle(10, 10, 100, 100);

// Paint a yellow rectangle with blue border
VGACanvas.setPenColor(Color::BrightBlue);
VGACanvas.setBrushColor(Color::BrightYellow);
VGACanvas.fillRectangle(10, 10, 100, 100);
VGACanvas.drawRectangle(10, 10, 100, 100);</pre> 
</div>
</div>
<a id="acb3142c2bef5036cb794cf6c52d1342c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb3142c2bef5036cb794cf6c52d1342c">&#9670;&nbsp;</a></span>getPresetFontInfo()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">FontInfo const  * ESP32VGA::VGACanvasClass::getPresetFontInfo </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>columns</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the font info that best fits the specified number of columns. </p>
<p>Look at VGADEFAULT80COLUMNS_FONTPATH, VGADEFAULT80COLUMNS_FONTNAME, VGADEFAULT132COLUMNS_FONTPATH and VGADEFAULT132COLUMNS_FONTNAME in <a class="el" href="_v_g_a_conf_8h.html" title="This file contains ESP32VGA library configuration settings, like number of supported colors...">VGAConf.h</a> to know which fonts are the preset fonts.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">columns</td><td>Number of columns (80 or 132). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The font info of the preset font. </dd></dl>

</div>
</div>
<a id="afe1914cd3853c0e24fcee32461e37fb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe1914cd3853c0e24fcee32461e37fb6">&#9670;&nbsp;</a></span>lineTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::lineTo </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a line starting from current pen position. </p>
<p>Starting pen position is specified using <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a170b2de935a499d70c7fc89a5512609d" title="Moves current pen position to the spcified coordinates. ">VGACanvasClass.moveTo()</a> method or from ending position of the last call to <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#afe1914cd3853c0e24fcee32461e37fb6" title="Draws a line starting from current pen position. ">VGACanvasClass.lineTo()</a>. The line has the current pen color.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal ending line position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical ending line position.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint white a triangle
VGACanvas.setPenColor(Color::BrightWhite);
VGACanvas.moveTo(10, 12);
VGACanvas.lineTo(30, 40);
VGACanvas.lineTo(10, 12);</pre> 
</div>
</div>
<a id="a170b2de935a499d70c7fc89a5512609d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a170b2de935a499d70c7fc89a5512609d">&#9670;&nbsp;</a></span>moveTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::moveTo </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Moves current pen position to the spcified coordinates. </p>
<p>Some methods expect initial pen position to be specified, like VGACanvas.lineTo().</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal pen position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical pen position.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a triangle
VGACanvas.moveTo(10, 12);
VGACanvas.lineTo(30, 40);
VGACanvas.lineTo(10, 12);</pre> 
</div>
</div>
<a id="a29fba58b06059dfd2e2aaf702f102c28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29fba58b06059dfd2e2aaf702f102c28">&#9670;&nbsp;</a></span>scroll()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::scroll </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>offsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>offsetY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Scrolls pixels horizontally and/or vertically. </p>
<p>Scrolling occurs inside the scrolling region defined by <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a3a9f5c86aca6c76ed95b6db2c1c91455" title="Defines the scrolling region. ">VGACanvasClass.setScrollingRegion()</a>. Vertical scroll is done moving line pointers, so it is very fast to perform. Horizontal scroll is done moving pixel by pixel (CPU intensive task).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offsetX</td><td>Number of pixels to scroll left (offsetX &lt; 0) or right (offsetX &gt; 0). </td></tr>
    <tr><td class="paramname">offsetY</td><td>Number of pixels to scroll up (offsetY &lt; 0) or down (offsetY &gt; 0). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afad05f6e02eb22aea6177b198dbeb50a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afad05f6e02eb22aea6177b198dbeb50a">&#9670;&nbsp;</a></span>setBrushColor() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::setBrushColor </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets brush (background) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">red</td><td>Red color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">green</td><td>Green color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">blue</td><td>Blue color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Set blue brush with 8 colors setup
VGACanvas.setBrushColor(0, 0, 1);

// Set blue brush with 64 colors setup
VGACanvas.setBrushColor(0, 0, 3);</pre> 
</div>
</div>
<a id="a19ebed82efd608547ed2d8a9ca678c11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19ebed82efd608547ed2d8a9ca678c11">&#9670;&nbsp;</a></span>setBrushColor() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::setBrushColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_v_g_a_controller_8h.html#a9bf2d199a46b81e16b229abae694d320">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets brush (background) color using a color name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Color name.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set blue brush
 VGACanvas.setBrushColor(Color::BrightBlue);</pre> 
</div>
</div>
<a id="aa6fa25e3a21dd816f91d9026568bb61a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6fa25e3a21dd816f91d9026568bb61a">&#9670;&nbsp;</a></span>setPenColor() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::setPenColor </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets pen (foreground) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">red</td><td>Red color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">green</td><td>Green color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">blue</td><td>Blue color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Set white pen with 8 colors setup
VGACanvas.setPenColor(1, 1, 1);

// Set white pen with 64 colors setup
VGACanvas.setPenColor(3, 3, 3);</pre> 
</div>
</div>
<a id="afb2f75e98a87e17605f6b76b78946d77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb2f75e98a87e17605f6b76b78946d77">&#9670;&nbsp;</a></span>setPenColor() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::setPenColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_v_g_a_controller_8h.html#a9bf2d199a46b81e16b229abae694d320">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets pen (foreground) color using a color name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Color name.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set white pen
 VGACanvas.setPenColor(Color::BrightWhite);</pre> 
</div>
</div>
<a id="ae6d6ac4139b68a8f541cee307b6a54c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6d6ac4139b68a8f541cee307b6a54c9">&#9670;&nbsp;</a></span>setPixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::setPixel </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills a single pixel with the pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal pixel position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical pixel position. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3a9f5c86aca6c76ed95b6db2c1c91455"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a9f5c86aca6c76ed95b6db2c1c91455">&#9670;&nbsp;</a></span>setScrollingRegion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::setScrollingRegion </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defines the scrolling region. </p>
<p>A scrolling region is the rectangle area where <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_canvas_class.html#a29fba58b06059dfd2e2aaf702f102c28" title="Scrolls pixels horizontally and/or vertically. ">VGACanvasClass.scroll()</a> method can operate.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae21a0bd0a1377feeaf598f8a6b6a88cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae21a0bd0a1377feeaf598f8a6b6a88cc">&#9670;&nbsp;</a></span>swapRectangle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::swapRectangle </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Swaps pen and brush colors of the specified rectangle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a76c129d38c766e5e1f73319c794bf7ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76c129d38c766e5e1f73319c794bf7ae">&#9670;&nbsp;</a></span>waitCompletion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGACanvasClass::waitCompletion </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>waitVSync</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Waits for drawing queue to become empty. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">waitVSync</td><td>If true drawings are done on vertical retracing (slow), if false drawings are perfomed immediately (fast with flickering). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_v_g_a_canvas_8h_source.html">VGACanvas.h</a></li>
<li>VGACanvas.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
